<% @language="vbscript" %>

<html xmlns="http://www.w3.org/1999/xhtml" lang="ru">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251"/>
<title></title>
<script type="text/javascript" language="javascript" src="../inc/request-client.js" charset="windows-1251"></script>
<script type="text/javascript" language="javascript" src="../_ScriptLibrary/json-lib/json2.js" charset="windows-1251"></script>
<script type="text/javascript" language="javascript" src="../_ScriptLibrary/json-lib/json_content.js" charset="windows-1251"></script>
<script type="text/javascript" language="javascript" charset="windows-1251">
    function page_onload() {
        var xmlhttpreq = getXmlHttp()

        setTimeout(function () {
            //debugger

            try {
                xmlhttpreq.open('POST', '../common/usersettings.asp?' + strjson.request({ "rand": Math.random(), "task": "redirect", "search": document.location.search.substring(1) }), true)

                xmlhttpreq.onreadystatechange = function () {
                    //debugger

                    if (!(xmlhttpreq.readyState == 4))
                        return
                    else
                        ;

                    if (xmlhttpreq.status == 200) {
                        var jsonResponse = {}

                        try { jsonResponse = JSON.parse(xmlhttpreq.responseText) }
                        catch (err) {
                        }

                        if (typeof (err) == "undefined") {
                            //debugger

                            //TO DO
                            //window.open(document.location.href = jsonResponse ["href"], "_blank")
                            window.open(jsonResponse["href"], "_self")
                        }
                        else
                            ;
                    }
                    else
                        xmlhttpreq = null
                }

                xmlhttpreq.send(null)
            }
            catch (err) { alert(err.Description) }

        }, 666)
    }
</script>
</head>
<body onload="page_onload ()">

</body>
</html>